package com.atguigu.gmall.payment.service;

import com.atguigu.gmall.payment.model.PaymentInfo;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * title:
 * author: Gyh
 * date:2023-05-09 20:30
 * Description:
 */
public interface PaymentInfoService extends IService<PaymentInfo> {

    /**
     * 保存本地交易记录
     * @param paymentInfo 支付对象
     * @param paymentType 交易类型
     */
    public void savePaymentInfo(PaymentInfo paymentInfo,String paymentType);

    /**
     * 根据订单编号+支付方式 查询本地交易记录
     * @param outTradeNo
     * @param paymentType
     * @return
     */
    PaymentInfo getPaymentInfoByOutTradeNo(String outTradeNo, String paymentType);

    /**
     * 根据订单编号+支付方式 查询本地交易记录
     * @param orderId
     * @param paymentType
     * @return
     */
    PaymentInfo getPaymentInfoByOrderId(Long orderId, String paymentType);
}
